package com.ruoyi.document.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.document.mapper.DocInformationsBankMapper;
import com.ruoyi.document.domain.DocInformationsBank;
import com.ruoyi.document.service.IDocInformationsBankService;

/**
 * 资料管理Service业务层处理
 *
 * @author ruoyi
 * @date 2024-12-04
 */
@Service
public class DocInformationsBankServiceImpl implements IDocInformationsBankService
{
    @Autowired
    private DocInformationsBankMapper docInformationsBankMapper;

    /**
     * 查询资料管理
     *
     * @param id 资料管理主键
     * @return 资料管理
     */
    @Override
    public DocInformationsBank selectDocInformationsBankById(Long id)
    {
        return docInformationsBankMapper.selectDocInformationsBankById(id);
    }

    /**
     * 查询资料管理列表
     *
     * @param docInformationsBank 资料管理
     * @return 资料管理
     */
    @Override
    public List<DocInformationsBank> selectDocInformationsBankList(DocInformationsBank docInformationsBank)
    {
        return docInformationsBankMapper.selectDocInformationsBankList(docInformationsBank);
    }

    /**
     * 新增资料管理
     *
     * @param docInformationsBank 资料管理
     * @return 结果
     */
    @Override
    public int insertDocInformationsBank(DocInformationsBank docInformationsBank)
    {
        docInformationsBank.setCreateTime(DateUtils.getNowDate());
        return docInformationsBankMapper.insertDocInformationsBank(docInformationsBank);
    }

    /**
     * 修改资料管理
     *
     * @param docInformationsBank 资料管理
     * @return 结果
     */
    @Override
    public int updateDocInformationsBank(DocInformationsBank docInformationsBank)
    {
        docInformationsBank.setUpdateTime(DateUtils.getNowDate());
        return docInformationsBankMapper.updateDocInformationsBank(docInformationsBank);
    }

    /**
     * 批量删除资料管理
     *
     * @param ids 需要删除的资料管理主键
     * @return 结果
     */
    @Override
    public int deleteDocInformationsBankByIds(Long[] ids)
    {
        return docInformationsBankMapper.deleteDocInformationsBankByIds(ids);
    }

    /**
     * 删除资料管理信息
     *
     * @param id 资料管理主键
     * @return 结果
     */
    @Override
    public int deleteDocInformationsBankById(Long id)
    {
        return docInformationsBankMapper.deleteDocInformationsBankById(id);
    }
}
